{extend name="public:base" /}

{block name="style"}
<link rel="stylesheet" href="__COMMON__/css/adminPage.css"  media="all">
{/block}
{block name="content"}

<div class="screening">
    <form class="layui-form" action='{:url("UpGoods/index")}' method="get">

        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">订单编号</label>
            <div class="layui-input-inline">
                <input type="text" name="ordernumber"  autocomplete="off" class="layui-input" value="{$Arr['order_code']? $Arr['order_code'] : ''}">
            </div>
        </div>
        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">订单状态</label>
            <div class="layui-input-inline">
                <select name="status">
                    <option value="5"  {$Arr['status'] == 5 ? 'selected' : ''} >已支付</option>
                    <option value="10" {$Arr['status'] == 10 ? 'selected' : ''}>已发货</option>
                    <option value="15" {$Arr['status'] == 15 ? 'selected' : ''}>未发货</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">开始时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" lay-verify="start_time" value="{$Arr['start_time']? $Arr['start_time'] : ''}" name="start_time" id="start_time" placeholder="yyyy-MM-dd HH:mm:ss">
            </div>
        </div>
        <div class="layui-form-item" style="clear: none;float: left">
            <label class="layui-form-label">结束时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="end_time" value="{$Arr['end_time']? $Arr['end_time'] : ''}" id="end_time" placeholder="yyyy-MM-dd HH:mm:ss">
            </div>
        </div>

        <div class="layui-form-item" style="clear: none;float: left">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">确定</button>
            </div>
        </div>
        <div class="clear"></div>
    </form>
</div>


<table class="layui-table" lay-data="{width: 892, height:332, url:'{$url}', page:true, id:'idTest'}" lay-filter="demo">
  <thead>
    <tr>
      <th lay-data="{type:'checkbox', fixed: 'left'}"></th>
      <th lay-data="{field:'id', width:80, sort: true, fixed: true}">ID</th>
      <th lay-data="{field:'username', width:80}">用户名</th>
      <th lay-data="{field:'sex', width:80, sort: true}">性别</th>
      <th lay-data="{field:'city', width:80}">城市</th>
      <th lay-data="{field:'sign', width:160}">签名</th>
      <th lay-data="{field:'experience', width:80, sort: true}">积分</th>
      
      <th lay-data="{field:'classify', width:80}">职业</th>
      <th lay-data="{field:'wealth', width:135, sort: true}">财富</th>
      <th lay-data="{field:'score', width:80, sort: true, fixed: 'right'}">评分</th>
      <th lay-data="{fixed: 'right', width:178, align:'center', toolbar: '#barDemo'}"></th>
    </tr>
  </thead>
</table>

{/block}

{block name="javascript"}
<script src="__COMMON__/js/fromCommon.js" charset="utf-8"></script>
<script type="text/javascript">

    layui.use('table', function(){
        var table = layui.table;
        //监听工具条
        table.on('tool(test)', function(obj){ //注：tool是工具条事件名，test是table原始容器的属性 lay-filter="对应的值"
            var data = obj.data; //获得当前行数据
            var layEvent = obj.event; //获得 lay-event 对应的值
            var tr = obj.tr; //获得当前行 tr 的DOM对象

        });
    });

    layui.use('form', function(){
        var form = layui.form;
        form.verify({
            start_time: function(value){
                var  end_time = $("#end_time").val();
                if( end_time != ""){
                    if( value == "" ){
                        return '请选择开始时间';
                    }
                }
            }
        });
    });

    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //时间选择器
        laydate.render({
            elem: '#start_time'
            ,type: 'datetime'
            ,trigger: 'click'
        });
        laydate.render({
            elem: '#end_time'
            ,type: 'datetime'
            ,trigger: 'click'
        });
    });
</script>
{/block}